package leetCode.hw.math;

public class HJ7Solution implements HJ7LikeNum {

    /**
     * 很简单，先将其转为整数,然后与原来的n和i+0.5作比较即可
     * @param n
     * @return
     */
    @Override
    public int getRoundOff(double n) {
        int i = (int)n;
        if(n>=1+0.5) {
            i++;
        }
        return i;
    }
}
